From: Ben Hutchings Date: Mon, 29 May 2023 22:16:39 +0000 (+0200) Subject: linux-perf: Remove remaining source filenames from executable X-Git-Tag: archive/raspbian/6.19.6-2+rpi1~3^2~66 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com//%22mailto:hjain.itbhu%40gmail.com/%22/%22http:/www.example.com/%22mailto:hjain.itbhu%40gmail.com/%22?a=commitdiff_plain;h=eb39a6d43e39a24cd867e1982bd2969111beca9a;p=linux.git linux-perf: Remove remaining source filenames from executable When we build perf with -ffile-prefix-map, there are still 2 source directory names embedded in the executable: 1. The Documentation subdirectory, used as a fallback from the installed location. 2. The python subdirectory, used in the Python script test. Remove (1) since it is an unnecessary fallback. Change (2) to the installed location. Gbp-Pq: Topic debian Gbp-Pq: Name linux-perf-remove-remaining-source-filenames-from-executable.patch --- diff --git a/tools/perf/Build b/tools/perf/Build index b03cc59dabf..f62599cc21a 100644 --- a/tools/perf/Build +++ b/tools/perf/Build @@ -52,7 +52,7 @@ CFLAGS_perf.o += -DPERF_HTML_PATH="BUILD_STR($(htmldir_SQ))" \ -DPREFIX="BUILD_STR($(prefix_SQ))" CFLAGS_builtin-trace.o += -DSTRACE_GROUPS_DIR="BUILD_STR($(STRACE_GROUPS_DIR_SQ))" CFLAGS_builtin-report.o += -DTIPDIR="BUILD_STR($(tipdir_SQ))" -CFLAGS_builtin-report.o += -DDOCDIR="BUILD_STR($(srcdir_SQ)/Documentation)" +#CFLAGS_builtin-report.o += -DDOCDIR="BUILD_STR($(srcdir_SQ)/Documentation)" perf-util-y += util/ perf-util-y += arch/ diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index add6b1c2aaf..7c50228b683 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c @@ -670,10 +670,12 @@ static int report__browse_hists(struct report *rep) path = system_path(TIPDIR); if (perf_tip(&help, path) || help == NULL) { +#if 0 /* fallback for people who don't install perf ;-) */ free(path); path = system_path(DOCDIR); if (perf_tip(&help, path) || help == NULL) +#endif help = strdup("Cannot load tips.txt file, please install perf!"); } free(path);